<template>
  <section v-if="routes.length > 0">
    <div v-for="(item, index) in routes"
         :key="index">
      <icon-svg class-name="iconClass mr6"
                icon-name="dianzihuidan" /> {{ item }}<br />
    </div>
  </section>
  <section v-else>--</section>
</template>

<script>
export default {
  name: "OrderLocus",
  props: {
    track: {
      type: Object,
      default: () => { }
    }
  },
  computed: {
    routes () {
      let arr = [];
      if (this.track?.routes && this.track.routes.length) {
        this.track.routes.map(item => {
          arr.push(item.route.transitNo || item.route.deviceCode)
        })
      }
      return arr;
    },
  }
};
</script>
<style scoped>
.mr6 {
  margin-right: 6px;
}
</style>